/*
 * @Descripttion: 路由配置
 * @Author: YuZhenJing
 * @Date: 2020-01-01 12:52:58
 * @LastEditors: YuZhenJing
 * @LastEditTime: 2020-03-25 21:42:08
 */
import vue from 'vue'
import Router from 'vue-router'
import Body from '@/views/Body.vue'
vue.use(Router)

const routes = [
  {
    path: '/',
    redirect: 'body'
  },
  {
    path: '/body',
    name: '总控主体功能',
    component: Body,
    redirect: '/body/user-list',
    children: [
      {
        path: 'user-list',
        component: () => import('@/views/module/user/UserList.vue')
      },
      {
        path: 'user-group',
        component: () => import('@/views/module/user/UserGroupList.vue')
      },
      {
        path: 'role-list',
        component: () => import('@/views/module/roles/RoleList.vue')
      },
      {
        path: 'menu-list',
        component: () => import('@/views/module/menu/MenuList.vue')
      },
      {
        path: 'org-list',
        component: () => import('@/views/module/org/OrgList.vue')
      },
      {
        path: 'sys-setting',
        component: () => import('@/views/module/help/SysSetting.vue')
      },
      { path: '*', redirect: '/404' }
    ]
  }
]

const router = new Router({
  mode: 'history',
  routes: routes
})

export default router
